using System;

using PowerPoint = Microsoft.Office.Interop.PowerPoint;
using MSGraph = Microsoft.Office.Interop.Graph;

using Outcoding.GraphGenerator.Entities;

namespace Outcoding.GraphGenerator.Generator.Util {
    public class XlLegendPositionHelper {
        public static MSGraph.XlLegendPosition GetXLLengendPosition(Entities.LegendPosition legendPosition){
            MSGraph.XlLegendPosition msLegendPosition = Microsoft.Office.Interop.Graph.XlLegendPosition.xlLegendPositionRight;
            switch(legendPosition){
                case LegendPosition.xlLegendPositionBottom:
                    msLegendPosition = Microsoft.Office.Interop.Graph.XlLegendPosition.xlLegendPositionBottom;
                    break;
                case LegendPosition.xlLegendPositionCorner:
                    msLegendPosition = Microsoft.Office.Interop.Graph.XlLegendPosition.xlLegendPositionCorner;
                    break;
                case LegendPosition.xlLegendPositionLeft:
                    msLegendPosition = Microsoft.Office.Interop.Graph.XlLegendPosition.xlLegendPositionLeft;
                    break;
                case LegendPosition.xlLegendPositionRight:
                    msLegendPosition = Microsoft.Office.Interop.Graph.XlLegendPosition.xlLegendPositionRight;
                    break;
                case LegendPosition.xlLegendPositionTop:
                    msLegendPosition = Microsoft.Office.Interop.Graph.XlLegendPosition.xlLegendPositionTop;
                    break;
            }

            return msLegendPosition;
        }
    }
}
